<!DOCTYPE html>
<html lang="zh-CN-Hans">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <title>注册</title>
    <link rel="stylesheet" type="text/css" href="/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="/layui/common.css">
    <style type="text/css">
        @keyframes animate_dots {
            0% {
                opacity: 1
            }
            to {
                opacity: 0
            }
        }

        @-webkit-keyframes animate_dots {
            0% {
                opacity: 1
            }
            to {
                opacity: 0
            }
        }

        .dot0, .dot1 {
            animation: animate_dots .9s infinite;
            -moz-animation: animate_dots .9s infinite;
            -webkit-animation: animate_dots .9s infinite;
            -o-animation: animate_dots .9s infinite
        }

        .dot1 {
            animation-delay: .2s;
            -webkit-animation-delay: .2s
        }

        .dot2 {
            animation: animate_dots .9s infinite;
            -moz-animation: animate_dots .9s infinite;
            -webkit-animation: animate_dots .9s infinite;
            -o-animation: animate_dots .9s infinite;
            animation-delay: .4s;
            -webkit-animation-delay: .4s
        }

        .dots_item {
            display: inline-block;
            margin-right: 5px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #4886ff
        }

        .verify-icon {
            position: absolute;
            width: 100%;
            margin-top: 70px;
            text-align: center
        }

        .t-mask {
            width: 100%;
            height: 100%;
            position: fixed;
            _position: absolute;
            left: 0;
            top: 0;
            background: #000;
            opacity: .5;
            filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);
            z-index: 2000000000
        }</style>
    <style>
        .rheader .rlogo a, .step_list li em, .zcys_con dl dt, .reg_ok dl dt {
            background: url(/imgs/regico.png) no-repeat;
        }

        em {
            font-style: normal;
        }

        .register_steps {
            padding-top: 50px;
        }

        .reg_steps_b {
            position: relative;
            height: 60px;
            width: 990px;
            margin: 50px auto;
            overflow: hidden;
        }

        .step_list {
            position: absolute;
            Z-index: 9;
            width: 840px;
            top: 0px;
            left: 75px;
        }

        .step_list li {
            float: left;
            width: 170px;
            margin-left: 40px;
            _display: inline;
        }

        .step_list li em {
            display: block;
            height: 22px;
            width: 22px;
            line-height: 22px;
            background-position: 0 -33px;
            margin: 0 auto;
            text-align: center;
            color: #fff;
        }

        .step_list li p {
            line-height: 40px;
            color: #919191;
            text-align: center;
            font-size: 14px;
        }

        .step_list li.current em {
            background-position: 0 -11px;
            width: 170px;
        }

        .step_list li.current p {
            color: #fe7342;
        }

        .reg_steps_b i {
            display: block;
            width: 100%;
            height: 2px;
            background: #e4e4e4;
            position: absolute;
            left: 0px;
            top: 10px;
            z-index: 1;
            overflow: hidden;
        }
        select{
            border: #f3f3f3 2px solid;
            padding: 10px;
            color: #333;
        }
    </style>
</head>
<body class="main">

<{include file="public/header.html"}>

<div id="main" class="layui-main">
    <div class="layui-breadcrumb breadcrumb" style="visibility: visible;">
        <a href="https://ctc.koogua.com/">首页</a><span lay-separator="">/</span>
        <a><cite>注册</cite></a>
    </div>

    <div class="reg_steps_b">
        <i class="gline"></i>
        <ul class="step_list">
            <li>
                <em>1</em>
                <p>验证手机</p>
            </li>
            <li class="current">
                <em>2</em>
                <p>行业选择</p>
            </li>
            <li>
                <em>3</em>
                <p>完善信息</p>
            </li>
            <li>
                <em>4</em>
                <p>注册成功</p>
            </li>
        </ul>
    </div>
    <div class="account-wrap wrap">
        <div class="layui-forms account-form">
            <div class="layui-form-item">
                <select v-model="params.firstLevel" style="width:100%;height: 350px;flex:1;" @change="showUpper(1)" class="forminput inputstyle textbox-text validatebox-text" size="20">
                    <template v-for="(vo,index) in firstArr">
                        <option :value="vo.id">{{vo.name}}</option>
                    </template>
                </select>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button v-if="params.firstLevel>0" @click="submit" class="layui-btn layui-btn-fluid" lay-filter="go">下一步</button>
                    <button v-else class="layui-btn layui-btn-fluid layui-btn-disabled" disabled="disabled" lay-submit="true" lay-filter="go">下一步</button>
                </div>
            </div>
        </div>
    </div>
</div>

<{include file="public/footer.html"}>

<script>
    var vm = new Vue({
        el: '#main',
        data: {
            params: {
                firstLevel: 0,
                secondLevel: 0,
                thirdLevel: 0,
            },
            firstArr: JSON.parse("<{addslashes(json_encode($mainCata))}>"),
            secondArr: [],
            thirdArr: [],
        },
        methods: {
            init() {
                if(!storage.exists('regItems')){
                    window.location.href = '/main/register';
                }
            },
            showUpper: function (level) {
                if (level == 1) {
                    vm.params.secondLevel = 0;
                    vm.params.thirdLevel = 0;
                    ajax(GetCat_url, {up: vm.params.firstLevel}).then(function (data) {
                        vm.secondArr = data.data;
                    });
                    vm.thirdArr = [];
                }
                if (level == 2) {
                    vm.params.thirdLevel = 0;
                    ajax(GetCat_url, {up: vm.params.secondLevel}).then(function (data) {
                        vm.thirdArr = data.data;
                    });
                }
            },
            submit() {
                if (vm.params.firstLevel>0) {
                    storage.add('regItems', {catalog_id:vm.params.firstLevel});
                    window.location.href = '/main/register/step/3';
                }
            }
        }
    });
    vm.init();
</script>
</body>
</html>
